package org.xbzheng.restful_study.tool;

import java.io.PrintWriter;
import java.io.StringWriter;

/**
 * Created by Administrator on 2016/12/14.
 */
public class ExceptionTool {
    public static String convertExceptionToString(Exception e){
        StringWriter sw = new StringWriter();
        PrintWriter pw = new PrintWriter(sw);
        e.printStackTrace(pw);
        return sw.toString();
    }
}
